package com.huan.rss.dao;

import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;

public class ProjectProperties extends Properties {
    private static ProjectProperties instance;
    private ProjectProperties(){
        //读取配置文件
        InputStream inputStream = ProjectProperties.class.getClassLoader().getResourceAsStream("project.properties");
        try {
            this.load(inputStream);//加载配置文件
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
    }
    public static ProjectProperties getInstance(){
        if(instance==null){
            instance = new ProjectProperties();
        }
        return instance;
    }
}
